Using the << Delimiter

Description

The Format parameter in the UI_DLG_BOX() command can be extremely long. It is not practical to enter the dialog Format on a single line between quotes. The << delimiter in an Xbasic script is used when you want to enter a long quoted string over many lines. The syntax of the << delimiter is:

<<%code%
text...
text...
text...
%code%

%code% is a tag that indicates the start of the string and the end of the string. The actual text used for the marker is irrelevant. The only requirement is that the marker at the beginning of the string must match the marker at the end of the string. In the above example, the text "code" is used as the marker.

While you are free to use any string that you want in the %marker% delimiter, we recommend that you use %dlg% as the delimiter for the "Dialog Format" string, and %code% as the delimiter for the "Code" string in a UI_DLG_BOX()command. If you use these specially named delimiters, Alpha Anywhere will give you bubble-help in the Code Editor while you are editing these strings.

The following Xbasic commands create two CR-LF (carriage return-line feed) delimited strings:

Colors = <<%dlg%
Green
Red
Blue
%dlg%
Sizes = <<%code%
Small
Medium
Large
%code%

The << delimiter is used in practically every Xdialog script that you will create.

Limitations

Desktop applications only.

See Also